package com.tabjin.rfidsocket.service.access;

import com.tabjin.rfidsocket.common.utils.PagedGridResult;
import com.tabjin.rfidsocket.pojo.ArchBuilding;
import com.tabjin.rfidsocket.pojo.ArchProjectBuildingUser;
import com.tabjin.rfidsocket.pojo.SysUser;
import com.tabjin.rfidsocket.pojo.bo.access.ArchBuildingBO;
import com.tabjin.rfidsocket.pojo.vo.access.ArchBuildingVO;

import java.util.List;
import java.util.Optional;

public interface ArchBuildingService {
    /**
     * 新增楼栋
     *
     * @param archBuildingBO
     */
    void add(ArchBuildingBO archBuildingBO);

    /**
     * 删除楼栋
     *
     * @param buildingId
     */
    void delete(Integer buildingId);

    /**
     * 更新楼栋
     *
     * @param archBuildingBO
     * @return
     */
    ArchBuildingVO update(ArchBuildingBO archBuildingBO);

    /**
     * 获取所有楼栋
     *
     * @param page
     * @param pageSize
     * @return PagedGridResult 分页结果类
     */
    PagedGridResult getAll(Integer page, Integer pageSize);

    /**
     * 获取单个楼栋
     *
     * @param buildingId
     * @return
     */
    Optional<ArchBuilding> getItem(Integer buildingId);

    /**
     * @param projectId
     * @return
     */
    PagedGridResult getBuildingsByProjectId(Integer projectId, Integer page, Integer pageSize);

    /**
     * @param projectId
     * @return
     */
    List<ArchBuilding> getBuildingsByProjectId(Integer projectId);

    /**
     * 获取楼栋下用户
     * @param buildingId
     * @return
     */
    List<SysUser> getBuildingUsers(Integer buildingId);

    /**
     * @param buildingId
     * @return
     */
    ArchBuildingVO searchItemByBuildingId(Integer buildingId);

    /**
     * 根据项目获取楼栋
     *
     * @param projectId
     * @return
     */
    List<ArchBuildingVO> searchItemsByProjectId(Integer projectId);

    /**
     * 根据用户获取楼栋
     *
     * @param projectId
     * @param userId
     * @return
     */
    Optional<List<ArchBuildingVO>> searchItemsByProjectIdAndUserId(Integer projectId, Integer userId);

    /**
     * @param buildingIdList
     * @return
     */
    List<ArchBuildingVO> searchItemByBuildingIdList(List<Integer> buildingIdList);

    /**
     * 获取产权性质
     *
     * @return
     */
    List<String> getPropertyRight();
}
